L=[8,8,8,8,8,8,8,8]#8个数
sumnumber = len(L)
restnumber = sumnumber
count=0
roundcount=0
#对数组数值进行排号操作
for i in range(0,len(L)):
    L[i]=i+1;#结果为L=[1,2,3,4,5,6,7,8]

#在只剩一个数之前一直进行
while restnumber > 1:
    j=0
    for j in range(sumnumber):#for的作用：确定出操作范围  while作用：反复进行操作
        if L[j] != 0:   #针对未被剔除的元素进行报数
            count += 1 #count：L[j]对应的报数
        if count == 3:
            L[j] = 0   #代表被剔除
            restnumber -= 1
            count = 0   #当count报到3时进行新一轮报数

print(L)
for a in L:
    if a != 0:
        b=a%3
        print(b)














